package com.example.demo.NiuKe.v08;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String  i;
        String s2="";
        while ((i = br.readLine())!=null){
            String  [] integers = new String[10];
            int length = i.length()-1;
            for (int j = length;j>=0;j--){
                String s = i.charAt(j)+"";
                int i1 = Integer.valueOf(s);
                if(integers[i1] == null){
                    integers[i1] = s;
                    s2=s2+s;
                }
            }
            System.out.println(s2);
        }
    }
}
